home *** CD-ROM | disk | FTP | other *** search
/ InterCD 2000 September / september_2000.iso / intercd / root / ^Linux / WindowMaker / src / funcs.h < prev    next >
Encoding:
C/C++ Source or Header  |  2000-02-16  |  4.4 KB  |  162 lines

  1. /*
  2.  *  Window Maker window manager
  3.  * 
  4.  *  Copyright (c) 1997, 1998 Alfredo K. Kojima
  5.  * 
  6.  *  This program is free software; you can redistribute it and/or modify
  7.  *  it under the terms of the GNU General Public License as published by
  8.  *  the Free Software Foundation; either version 2 of the License, or
  9.  *  (at your option) any later version.
  10.  *
  11.  *  This program is distributed in the hope that it will be useful,
  12.  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
  13.  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  14.  *  GNU General Public License for more details.
  15.  *
  16.  *  You should have received a copy of the GNU General Public License
  17.  *  along with this program; if not, write to the Free Software
  18.  *  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, 
  19.  *  USA.
  20.  */
  21.  
  22. #ifndef WMFUNCS_H_
  23. #define WMFUNCS_H_
  24.  
  25. #include <sys/types.h>
  26. #include <stdio.h>
  27.  
  28. #include "window.h"
  29.  
  30. typedef void (WCallBack)(void *cdata);
  31.  
  32. typedef void (WDeathHandler)(pid_t pid, unsigned int status, void *cdata);
  33.  
  34. void Shutdown(WShutdownMode mode);
  35.  
  36. void RestoreDesktop(WScreen *scr);
  37.  
  38. void Exit(int status);
  39.  
  40. void Restart(char *manager, Bool abortOnFailure);
  41.  
  42. void SetupEnvironment(WScreen *scr);
  43.  
  44. void DispatchEvent(XEvent *event);
  45.  
  46. #ifndef LITE
  47.  
  48. Bool wRootMenuPerformShortcut(XEvent *event);
  49.  
  50. void wRootMenuBindShortcuts(Window window);
  51.  
  52. void OpenRootMenu(WScreen *scr, int x, int y, int keyboard);
  53.  
  54. void OpenSwitchMenu(WScreen *scr, int x, int y, int keyboard);
  55.  
  56. #endif /* !LITE */
  57.  
  58. void OpenWindowMenu(WWindow *wwin, int x, int y, int keyboard);
  59.  
  60. void OpenMiniwindowMenu(WWindow *wwin, int x, int y);
  61.  
  62. void OpenWorkspaceMenu(WScreen *scr, int x, int y);
  63.  
  64. void CloseWindowMenu(WScreen *scr);
  65.  
  66. #ifdef LITE
  67.  
  68. #define UpdateSwitchMenu(a, b, c)
  69.  
  70. #define UpdateSwitchMenuWorkspace(a, b)
  71.  
  72. #else /*! LITE */
  73.  
  74. void UpdateSwitchMenu(WScreen *scr, WWindow *wwin, int action);
  75.  
  76. void UpdateSwitchMenuWorkspace(WScreen *scr, int workspace);
  77.  
  78. #endif /* !LITE */
  79.  
  80. WMagicNumber wAddDeathHandler(pid_t pid, WDeathHandler *callback, void *cdata);
  81.  
  82. void wColormapInstallForWindow(WScreen *scr, WWindow *wwin);
  83.  
  84. void wColormapInstallRoot(WScreen *scr);
  85.  
  86. void wColormapUninstallRoot(WScreen *scr);
  87.  
  88. void wColormapAllowClientInstallation(WScreen *scr, Bool starting);
  89.  
  90. Pixmap LoadIcon(WScreen *scr, char *path, char *mask, int title_height);
  91.  
  92. void PlaceIcon(WScreen *scr, int *x_ret, int *y_ret);
  93.  
  94. void PlaceWindow(WWindow *wwin, int *x_ret, int *y_ret,
  95.                  unsigned int width, unsigned int height);
  96.  
  97. #ifdef USECPP
  98. char *MakeCPPArgs(char *path);
  99. #endif
  100.  
  101. char *ExpandOptions(WScreen *scr, char *cmdline);
  102.  
  103. void ExecuteShellCommand(WScreen *scr, char *command);
  104.  
  105. void StartLogShell(WScreen *scr);
  106.  
  107. Bool IsDoubleClick(WScreen *scr, XEvent *event);
  108.  
  109. WWindow *NextToFocusAfter(WWindow *wwin);
  110. WWindow *NextToFocusBefore(WWindow *wwin);
  111.  
  112. void SlideWindow(Window win, int from_x, int from_y, int to_x, int to_y);
  113.  
  114. char *ShrinkString(WMFont *font, char *string, int width);
  115.  
  116. char *FindImage(char *paths, char *file);
  117.  
  118. RImage*wGetImageForWindowName(WScreen *scr, char *winstance, char *wclass);
  119.  
  120. BOOL StringCompareHook(proplist_t pl1, proplist_t pl2);
  121.  
  122. int IsEof(FILE * stream);    /* feof that stats pipes */
  123.  
  124. char *FlattenStringList(char **list, int count);
  125.  
  126. void ParseWindowName(proplist_t value, char **winstance, char **wclass,
  127.                      char *where);
  128.  
  129. void SendHelperMessage(WScreen *scr, char type, int workspace, char *msg);
  130.  
  131. char *GetShortcutString(char *text);
  132.  
  133. char *EscapeWM_CLASS(char *name, char *class);
  134.  
  135. void UnescapeWM_CLASS(char *str, char **name, char **class);
  136.  
  137. #ifdef NUMLOCK_HACK
  138. void wHackedGrabKey(int keycode, unsigned int modifiers,
  139.             Window grab_window, Bool owner_events, int pointer_mode,
  140.             int keyboard_mode);
  141. #endif
  142.  
  143. void wHackedGrabButton(unsigned int button, unsigned int modifiers, 
  144.                Window grab_window, Bool owner_events, 
  145.                unsigned int event_mask, int pointer_mode, 
  146.                int keyboard_mode, Window confine_to, Cursor cursor);
  147.  
  148.  
  149. /* this function is in dock.c */
  150. void ParseCommand(char *command, char ***argv, int *argc);
  151.  
  152. void ExecExitScript();
  153.  
  154. /****** I18N Wrapper for XFetchName,XGetIconName ******/
  155.  
  156. Bool wFetchName(Display *dpy, Window win, char **winname);
  157. Bool wGetIconName(Display *dpy, Window win, char **iconname);
  158.  
  159.  
  160.  
  161. #endif
  162.